package com.oocl.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.oocl.dao.WareHouseDao;
import com.oocl.dao.impl.WareHouseDaoImpl;
import com.oocl.pojo.Warehouse;

/**
 * Servlet implementation class ShowWareHouseAddServlet
 */
public class ShowWareHouseAddServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private WareHouseDao wareDao;
       
    public ShowWareHouseAddServlet() {
        super();
        wareDao = new WareHouseDaoImpl();
    }
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		List<Warehouse> wareHouse = wareDao.loadWareHouse();
		request.getSession().setAttribute("wareHouse", wareHouse);
		request.getRequestDispatcher("../show.jsp").forward(request, response);
	}

}
